package com.hardy.demo.observer;

import java.lang.ref.SoftReference;

/**
 * Author: Hardy
 * Date:   2019/3/8
 * Description:
 **/
public class Main {
    public static void main(String[] args) {
        SoftReference a = new SoftReference("aaa");
    }

    public static void observer() {
        TestAObserver a = new TestAObserver();
        TestBObserver b = new TestBObserver();

        Subject subject = new Subject();
        subject.addObserver(a);
        subject.addObserver(b);

        subject.update();
    }
}
